//Source file: D:\\test\\com\\ce\\pms\\customer\\model\\ProRightDO.java

package com.ce.pms.customer.model;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ce.pms.common.model.SysInfo;
import com.ce.pms.common.model.SysrefcodeDO;
import com.ce.pms.house.model.HouseDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:产权 关联表:HM_PRO_RIGHT
 *
 * @author Adama Yue
 */
@Entity
@Table(name = "HM_PRO_RIGHT")
public class ProRightDO implements IDomainObject{

	/**
	 * 分开记账策略标志
	 */
	public static final String CHARGE_SELECT_DETACHED = SysrefcodeDO.CONSTANTS_DIGITAL_ONE;

	/**
	 * 合并记账策略标志
	 */
	public static final String CHARGE_SELECT_MERGER = SysrefcodeDO.CONSTANTS_DIGITAL_ZERO;


	@Id
	@GeneratedValue
	@Column(name = "PRO_RIGHT_ID")
	private Long proRightId;

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_ID",nullable=false)
	private HouseDomain house;// 房屋

	@Column(name="COMPACT",nullable=true,insertable=true,updatable=true,length=50)
	private String contactNO;//预售合同号
	@Column(name="HOUSE_PROPERTY_NO",nullable=true)
	private String proRightNO;// 产权证号
	@Column(name="CHARGE_SELECT",nullable=true)
	private String chargeSelect;//记帐策略(1分开记帐;0合并记帐)
	@Column(name="VALIDITY",nullable=false)
	private String validity;// 生效状态(1表示生效;0表示失效)
	@Embedded
	private SysInfo sysInfo;// 系统信息

	public ProRightDO() {
	}
	/**
	 * mini constructor
	 * @param house  房屋
	 * @param sysInfo 系统信息
	 */
	public ProRightDO(HouseDomain house, SysInfo sysInfo) {
		super();
		this.house = house;
		this.sysInfo = sysInfo;
		this.validity = SysrefcodeDO.CONSTANTS_DIGITAL_ONE;
	}
	/**************************************************
	 * Accessors and Modifiers
	 **************************************************/
	public HouseDomain getHouse() {
		return house;
	}
	public void setHouse(HouseDomain house) {
		this.house = house;
	}
	public Long getProRightId() {
		return proRightId;
	}
	public void setProRightId(Long proRightId) {
		this.proRightId = proRightId;
	}
	public String getProRightNO() {
		return proRightNO;
	}
	public void setProRightNO(String proRightNO) {
		this.proRightNO = proRightNO;
	}
	public SysInfo getSysInfo() {
		return sysInfo;
	}
	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}
	public String getValidity() {
		return validity;
	}
	public void setValidity(String validity) {
		this.validity = validity;
	}
	public String getContactNO() {
		return contactNO;
	}
	public void setContactNO(String contactNO) {
		this.contactNO = contactNO;
	}
	public String getChargeSelect() {
		return chargeSelect;
	}
	public void setChargeSelect(String chargeSelect) {
		this.chargeSelect = chargeSelect;
	}

}
